<include file="Public/header" />
<script type="text/javascript">
function submit_delete_batch()
{
    /* 获取选中的项 */
    var items = '';
    $('.checkitem:checked').each(function(){
        items += this.value + ',';
    });
    if(items != '') {
        items = items.substr(0, (items.length - 1));
        submit_delete(items);
    }  
    else {
        alert('请选择要操作的对象');
    }
}
function submit_delete(id)
{
    if(confirm('你确定要进行此操作？')) {
        $('#list_form').attr('method','post');
        $('#list_form').attr('action','index.php?act=member&op=drop');
        $('#member_id').val(id);
        $('#list_form').submit();
    }
}
</script>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>团购管理</h3>
      <ul class="tab-base">
        <li><a href="javascript:void(0);" class="current"><span>管理</span></a></li>
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  <form method="get" name="formSearch">
    <table class="tb-type1 noborder search">
      <tbody>
        <tr>
          <td>
			  <select name='s_type'>
                <option value="order_sn" <if condition="$search['s_type'] eq 'order_sn'">selected</if>>订单编号</option>
                <option value="member_name" <if condition="$search['s_type'] eq 'member_name'">selected</if>>会员名称</option>
                <option value="store_name" <if condition="$search['s_type'] eq 'store_name'">selected</if>>商铺名称</option>
                <option value="item_name" <if condition="$search['s_type'] eq 'item_name'">selected</if>>团购名称</option>
			  </select>
          </td>
          <td><input type="text" value="{$search['s_content']}" name="s_content" class="txt" ></td>
          <td><a href="javascript:document.formSearch.submit();" class="btn-search tooltip" title="查询">&nbsp;</a></td>
        </tr>
      </tbody>
    </table>
  </form>
  <!-- 操作说明 -->
  <table class="table tb-type2" id="prompt">
    <tbody>
      <tr class="space odd">
        <th colspan="12" class="nobg">
	        <div class="title">
	            <h5>操作提示</h5>
	            <span class="arrow"></span>
	        </div>
        </th>
      </tr>
      <tr>
        <td>
		  <ul>
            <li>可以对订单进行删除操作</li>
            <li>列表显示订单编号、会员名称、商铺、团购名称、状态等信息</li>
          </ul>
		</td>
      </tr>
    </tbody>
  </table>
  <form id="list_form" method='post'>
    <input id="member_id" name="member_id" type="hidden" />
    <table class="table tb-type2">
      <thead>
        <tr class="space">
          <th colspan="15" class="nobg">列表</th>
        </tr>
        <tr class="thead">
          <th class="w200">订单编号</th>
		  <th class="w48">会员名称</th>
		  <th class="w120">商铺名称</th>
		  <th class="w48">添加时间</th>
		  <th class="w200">团购名称</th>
          <th class="w48">数量</th>
		  <th class="w48">价格</th>
		  <th class="w48">状态</th>
        </tr>
      </thead>
      <tbody>
        <notempty name="list">
        <volist name="list" id="val">
        <tr class="hover edit">
		  <td>{$val['order_sn']}</td>
		  <td>{$val['member_name']}</td>
		  <td><a href="#" target="_blank">{$val['store_name']}</a></td>
		  <td>{$val['add_time']|date='Y-m-d',###}</td>
		  <td><a href="#" target="_blank">{$val['item_name']}</a></td>
		  <td>{$val['number']}</td>
		  <td><span style="color:#E64D5E;font-weight:bold;font-size:14px">{$val['price']}</span>元</td>
		  <td>
          	<if condition="$val['state'] eq 1">未支付
            <elseif condition="$val['state'] eq 2"/>已支付
            <else/>已消费
			</if>	
		  </td>
        </tr>
        </volist>
        <else/>
        <tr class="no_data">
          <td colspan="10">暂无记录</td>
        </tr>
        </notempty>
      </tbody>
      <notempty name="list">
      <tfoot>
        <tr class="tfoot">
          <td></td>
          <td id="batchAction" colspan="15">
            <div class="pagination">{$page_show}</div>
          </td>
        </tr>
      </tfoot>
      </notempty>
    </table>
  </form>
</div>
<include file="Public/footer" />